﻿@using System.Diagnostics.CodeAnalysis
@using WinformBlazor.Components
<div class="o-input">
    <Select @bind-Value="ControlInfo.Style.LocateMode" DisplayText="定位方式" PlaceHolder="默认值" ShowLabel="true" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></Select>
</div>
<div class="o-input">
    <BootstrapInput @bind-Value="ControlInfo.Style.leftWithScoll" DisplayText="X坐标" ShowLabel="true" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></BootstrapInput>
</div>
<div class="o-input">
    <BootstrapInput @bind-Value="ControlInfo.Style.topWithScoll" DisplayText="Y坐标" ShowLabel="true" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></BootstrapInput>
</div>
<div class="o-input">
    <BootstrapInput @bind-Value="ControlInfo.Style.width" DisplayText="宽" PlaceHolder="需要带单位%或者px" ShowLabel="true" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></BootstrapInput>
</div>
<div class="o-input">
    <BootstrapInput @bind-Value="ControlInfo.Style.height" DisplayText="高" PlaceHolder="需要带单位%或者px" ShowLabel="true" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></BootstrapInput>
</div>
<Collapse>
    <CollapseItems>
        <CollapseItem Text="外边框设置">
            <div class="o-input">
                <Select @bind-Value="ControlInfo.Style.border_style" PlaceHolder="无边框" ShowLabel="true" DisplayText="边框样式" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></Select>
            </div>
            <div class="o-input">
                <ColorPicker @bind-Value="ControlInfo.Style.border_color" ShowLabel="true" DisplayText="边框颜色" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></ColorPicker>
            </div>
            <div class="o-input">
                <BootstrapInputNumber @bind-Value="ControlInfo.Style.border_width" ShowLabel="true" DisplayText="边框粗细" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></BootstrapInputNumber>
            </div>
        </CollapseItem>
    </CollapseItems>
</Collapse>

@switch (ControlInfo.Type)
{
    case ContrloType.Form:
    case ContrloType.Panel:
        <div class="o-input">
            <Select @bind-Value="ControlInfo.Style.overflow_x" PlaceHolder="默认值" ShowLabel="true" DisplayText="横向滚动条" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></Select>
        </div>
        <div class="o-input">
            <Select @bind-Value="ControlInfo.Style.overflow_y" PlaceHolder="默认值" ShowLabel="true" DisplayText="垂直滚动条" OnValueChanged="(e)=>{ MainPage?.UpdateHander?.Invoke(); return Task.CompletedTask;}"></Select>
        </div>
        break;
    case ContrloType.Textbox:
        break;
    case ContrloType.Button:
        break;

    case ContrloType.Label:
        break;
    case ContrloType.CheckBox:
        break;
}


